package cn.itrip.dao.mapper;

import cn.itrip.beans.pojo.ItripHotelOrder;
import cn.itrip.beans.vo.OrderVo;
import cn.itrip.common.PageUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ItripHotelOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ItripHotelOrder record);

    int insertSelective(ItripHotelOrder record) throws Exception ;

    /**
     * 查询总记录数
     * @param orderVo
     * @param id
     * @return
     */
    int selectCount(@Param("orderVo")OrderVo orderVo, @Param("id") int id) throws Exception;
    //分页
    List<ItripHotelOrder> selectUserByQuery(@Param("page") PageUtil page, @Param("id") int userid)throws Exception;

     /** 根据id查询单个订单详情
     * @param id
     * @return
     */
    ItripHotelOrder selectById(@Param("id") Long id)throws Exception;
    /**
     * 根据id查询单个入住信息
     * @param id
     * @return
     */
    ItripHotelOrder selectByKey(@Param("id") Long id)throws Exception;

    /**
     * 根据订单号查询订单信息
     * @param orderNo
     * @return
     */
    ItripHotelOrder selectByOrderNo(@Param("orderNo") String orderNo)throws Exception;

    /**
     * 根据订单号修改信息
     * @param itripHotelOrder
     * @return
     */
    int updateByOrderNo(ItripHotelOrder itripHotelOrder)throws Exception;
    int updateByPrimaryKeySelective(ItripHotelOrder record)throws  Exception;

    /**
     * 修改订单状态
     * @param record
     * @return
     * @throws Exception
     */
    int updateByPrimaryKey(ItripHotelOrder record)throws  Exception;


    List<ItripHotelOrder> selectAll();

    int selectBigId()throws  Exception;

    long updateOrderStatus(long orderId)throws  Exception;
}